-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Examples,PeriphDrivers): Add I2C_ADXL343 example to MAX32690, fix double read backs for I2C repeated start condition in ADXL343 drivers, and add minor I2C MasterTransaction Sync fix #1211
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/clang-format-run |
/clang-format-run |
sihyung-maxim
added
the
Ready for review
Raise "Ready" flag if PR is ready for review after WIP is down.
label
Oct 4, 2024
…er sends stop condition
sihyung-maxim
changed the title
feat(Examples,PeriphDrivers): Add I2C_ADXL343 example to MAX32690 and fix double read backs for I2C repeated start condition in ADXL343 drivers
feat(Examples,PeriphDrivers): Add I2C_ADXL343 example to MAX32690, fix double read backs for I2C repeated start condition in ADXL343 drivers, and add minor I2C MasterTransaction Sync fix
Oct 8, 2024
lorne-maxim
approved these changes
Oct 8, 2024
sihyung-maxim
pushed a commit
to analogdevicesinc/hal_adi
that referenced
this pull request
Oct 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
MAX32690
Related to the MAX32690 (ME18)
Ready for review
Raise "Ready" flag if PR is ready for review after WIP is down.
Workflow
Related to Workflow development
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
MSTCTRL.stop
) register when the CONTROLLER (prev. MASTER) sets the STOP condition.I2C_INTFL0.stop
is for when the device is in TARGET (prev. SLAVE) mode and detects a STOP condition.When testing on the ME18, the MasterTransaction function doesn't support repeated start conditions in the protocol that ADXL343 supports for all-in-one transaction requests due to how the request struct and the driver's reads logic are set up for a single transaction call (read -> check comm error -> restart read if still expecting more messages -> repeat back to step 1 (read) until all reads finish).
For reference, this is the READ RSC protocol for the ADXL343 (common for other ICs with accessible registers as well).
Back to the read logic in the MasterTransaction function, the last step before the repeat (restart read if still expecting more messages) causes a double readback and hanging transaction failures when attempting to run the READ RSC transaction mentioned above. Removing the last step is a temporary workaround to prevent double readbacks and support RSC-type transactions, but it breaks normal/non-RSC I2C transactions.
Adding a solution to support both normal and RSC transactions will be too invasive and require more time to verify. Because this PR has been blocking this upcoming release, investigating further into this matter will have to wait until after the release. For now, I left the I2C drivers (specifically MasterTransaction) as is, similar to our previous releases, and any RSC-type transactions will have to be done (at least for the ADXL343) using two I2C_MasterTransaction calls: the first transaction will be everything that happens BEFORE the second START condition (which is writing which register to read from), and the second transaction will be everything that happens AFTER the second START condition (which is reading the contents of the written register).
Checklist Before Requesting Review